package com.sh.data.engine.application.model.request.normalization;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author tinglan.ys
 * @description:
 * @date 2022/4/28 下午3:19
 */
@Data
@Schema
public class IndexOfflineDevTaskFlowSaveRequest {

    @Schema(description = "指标id")
    private Long IndexId;

    @NotNull(message = "父目录不能为空")
    @Schema(description = "父节点id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long pid;

    @NotBlank(message = "名称不能为空")
    @Length(min = 2, max = 64, message = "名称长度为2-64个字符")
    @Pattern(regexp = "[a-zA-Z0-9_\\u4e00-\\u9fa5]+", message = "名称支持中文、字母、数字、下划线")
    @Schema(description = "节点名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @Schema(description = "描述")
    private String remark;
}
